<template>
    <div class="vipRecharge">
        <ul class="clearfix vipRechargeBox">
            <li @click="liActive('yearVip',298,12)">
                <div class="vipImgBox">
                    <img src="../../img/yearVip.png" alt="">
                </div>
                <p class="vipInfoBox" :class="[vipActive=='yearVip'?'borderColor':'']">
                    <span>畅享12个月VIP服务</span>
                    <span>VIP素材免费</span>
                    <span>每天仅需0.8元</span>
                </p>
                <img :class="[vipActive=='yearVip'?'vipActive':'']" class="vipImgFooter" src="../../img/vipImgFooter.png" alt="">
            </li>
            <li @click="liActive('quarterVip',90,3)">
                <div class="vipImgBox">
                    <img src="../../img/quarterVip.png" alt="">
                </div>
                <p class="vipInfoBox" :class="[vipActive=='quarterVip'?'borderColor':'']">
                    <span>畅享90天VIP服务</span>
                    <span>VIP素材免费</span>
                    <!-- <span>每天仅需0.8元</span> -->
                </p>
                <img :class="[vipActive=='quarterVip'?'vipActive':'']" class="vipImgFooter" src="../../img/vipImgFooter.png" alt="">
            </li>
        </ul>
    </div>
</template>
<script>
export default {
    name: "vipRecharge",
    data(){
        return {
            vipActive : "yearVip"
        }
    },
    methods:{
        liActive(msg,number,month){
            this.vipActive = msg;
            this.$emit("quotaChangeVip",number,month)
        }
    }
}
</script>
<style>
    .vipRecharge{
        margin: 60px 0 60px 118px;
    }
    .vipRechargeBox li{
        float: left;
        position: relative;
        margin-right: 67px;
    }
    .vipImgBox img{
        width: 262px;
        height: 173px;
        display: block;
        border-radius: 4px 4px 0 0;
    }
    .vipInfoBox{
        width: 262px;
        height: 116px;
        border: 1px solid #ddd;
        padding-top: 19px;
        border-top: none;
        border-radius: 0 0 4px 4px;
    }
    .vipInfoBox span{
        display: inline-block;
        width: 100%;
        font-size: 14px;
        height: 28px;
        text-align: center;
        color: #666666;
    }
    .vipImgFooter{
        position: absolute;
        bottom: 1px;
        right: 1px;
        display: none;
    }
    .vipActive{
        display: block;
    }
    .borderColor{
        border-color: #ed6360;
    }
</style>